#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
int main(int argc, char const *argv[])
{
    pid_t pid = fork();
    if(pid == 0){
        printf("我是子进程我的id%d父id%d\n",getpid(),getppid());
        
    }else if (pid > 0)
    {
        printf("我是父进程我的id%d,子id为%d\n",getpid(),pid);
    }
    
    return 0;
}
